﻿using Edu.Presentation;
using System.Windows;
using MessageBoxIcon = Panuon.WPF.UI.MessageBoxIcon;
using DefaultButton = Panuon.WPF.UI.DefaultButton;

namespace MainApp.Utils
{
    public static class WindowExtensions
    {
        public static void ShowInfo(this Window window, string message)
        {
            MessageBoxX.Show(window, message, "提示信息", MessageBoxButton.OK, MessageBoxIcon.Info);
        }

        public static void ShowError(this Window window, string message)
        {
            MessageBoxX.Show(window, message, "提示信息", MessageBoxButton.OK, MessageBoxIcon.Error);
        }

        public static MessageBoxResult ShowOkCancelAsk(this Window window, string message)
        {
            return MessageBoxX.Show(window, message, "提示信息", MessageBoxButton.OKCancel, MessageBoxIcon.Question, DefaultButton.CancelNo);
        }

        public static MessageBoxResult ShowYesNoAsk(this Window window, string message)
        {
            return MessageBoxX.Show(window, message, "提示信息", MessageBoxButton.YesNo, MessageBoxIcon.Question, DefaultButton.CancelNo);
        }
    }
}
